﻿using Pattern20中介者模式.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pattern20中介者模式.Models
{
    internal class Mediator : MediatorBase
    {
        public Mediator(PlayerBase a, PlayerBase b, PlayerBase c) : base(a, b, c)
        {
        }

        public override void ALose(int money)
        {
            a.Money -= money * 2;
            b.Money += money;
            c.Money += money;
        }

        public override void AWin(int money)
        {
            a.Money += money * 2;
            b.Money -= money;
            c.Money -= money;
        }

        public override void BLose(int money)
        {
            a.Money += money;
            b.Money -= money *2;
            c.Money += money;
        }

        public override void BWin(int money)
        {
            a.Money -= money ;
            b.Money += money* 2;
            c.Money -= money;
        }

        public override void CLose(int money)
        {
            a.Money += money;
            b.Money += money;
            c.Money -= money * 2;
        }

        public override void CWin(int money)
        {
            a.Money -= money;
            b.Money -= money;
            c.Money += money * 2;
        }
    }
}
